home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 9,300 to 9,399 / 9300.zip / AOLDLs / HTML & Web Tools (MAC) / HTML_ MTX Web Publishing Tool / MTX Tool 1.3.sit / MTX Tool 1.3 / MTX Tool 1.3.1 / stack_-1.xml < prev    next >
Extensible Markup Language  |  1996-03-05  |  26KB  |  22 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.1</name>
  5.     <id>-1</id>
  6.     <cardCount>3</cardCount>
  7.     <cardID>3992</cardID>
  8.     <listID>2875</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>--ΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùè--Γùè     Name  MTX Tool--Γùè  Version  1.3--Γùè  Created  12/12/94 12:19 AM--Γùè Modified  3/3/96 4:17 PM--Γùè   Author  Richard Rathe--Γùè  Comment--Γùè--Γùè  Copyright 1995 by University of Florida--Γùè--Γùè  1 Globals:--Γùè  configData--Γùè--Γùè  4 Handlers:--Γùè  openCard closeStack doMenu reorg--Γùè--Γùè  18 Functions:--Γùè  scanFile checkMTX makeKeywords makeTitle makeSlideTitle makeAnswerTitle--Γùè  makeHead makeTail makeNavi makeLeader stripLeader stripInfo--Γùè  slideInfo fixChars fixMain stripLineFeeds stripPath stripFile--Γùè--Γùè  25286 Characters / 809 Lines / 23 Comments--ΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèΓùèon openCardhide fld "help"end openCardon closeStackrepeat with x=1 to number of cdsset cursor to busyput empty into fld "info" of cd xput empty into fld "infoText" of cd xend repeatend closeStackon doMenu whatif what is "New Card" thenask "Enter name for new card:" with "Project"if it is empty thenexit doMenuelsesend "doMenu New Card" to hypercardput it into fld "name"push cdreorgpop cdend ifelse if what is "Message" thensend "makeAll timed" to this cdelsepass doMenuend ifend doMenufunction scanFile inputFile, outputPathglobal configDataput "-#?|" into specialCharsput space & tab & "#'=-?@$|\" into stopCharsput inputFile into line 1 of fld "info"put "Scanning source file..." into line 2 of fld "info"put inputFile into fld "infoText"open file inputFileput fld "switches" & return into mainTextread from file inputFile for 16000repeat while it is not emptyput it after mainTextread from file inputFile for 16000end repeatclose file inputFileif mainText is empty thenbeepbeepanswer "Empty file!"put empty into fld "info"put empty into fld "infoText"exit to hypercardend ifput number of lines of mainText && "Lines /" && number of chars ┬¼of mainText && "Characters" & return before fld "infoText"put stripLineFeeds(mainText) into mainTextrepeat with x=number of lines of mainText down to 1set cursor to busyif char 1 of line x of mainText is "%" thenput line x of mainText into theInfodelete line x of mainTextput theInfo & return before fld "infoText"if theInfo contains "%FILE" thenput stripInfo(theInfo) into line 1 of configDataelse if theInfo contains "%TITLE" thenput stripInfo(theInfo) into line 2 of configDataelse if theInfo contains "%HEADING" thenput stripInfo(theInfo) into line 3 of configDataelse if theInfo contains "%AUTHOR" thenput stripInfo(theInfo) into line 4 of configDataelse if theInfo contains "%AUTHURL" thenput stripInfo(theInfo) into line 5 of configDataelse if theInfo contains "%AUTHORURL" then -- oldput stripInfo(theInfo) into line 5 of configDataelse if theInfo contains "%CONTACT" then -- oldput stripInfo(theInfo) into line 5 of configDataelse if theInfo contains "%MTX" thenput "MTX" && stripInfo(theInfo) into line 6 of configDataelse if theInfo contains "%VERSION" thenput stripInfo(theInfo) into line 7 of configDataelse if theInfo contains "%VERSURL" thenput stripInfo(theInfo) into line 8 of configDataelse if theInfo contains "%OUTLINE" thenput stripInfo(theInfo) into line 9 of configDataelse if theInfo contains "%LAYOUT" thenput stripInfo(theInfo) into line 10 of configDataelse if theInfo contains "%LOGO" thenput stripInfo(theInfo) into line 11 of configDataelse if theInfo contains "%ICON" thenput stripInfo(theInfo) into line 12 of configDataelse if theInfo contains "%IMAGES" thenput stripInfo(theInfo) into line 13 of configDataelse if theInfo contains "%COMMENT" thenput stripInfo(theInfo) into line 14 of configDataelse if theInfo contains "%PATH" thenput stripInfo(theInfo) into line 15 of configDataelse if theInfo contains "%LOCATION" then  -- oldput stripInfo(theInfo) into line 15 of configDataelse if theInfo contains "%BASE" thenput stripInfo(theInfo) into line 16 of configDataelse if theInfo contains "%REFRESH" thenput stripInfo(theInfo) into line 17 of configDataelse if theInfo contains "%COUNTER" thenput stripInfo(theInfo) into line 18 of configDataelse if theInfo contains "%COLORS" thenput stripInfo(theInfo) into line 19 of configDataelse if theInfo contains "%WATERMARK" thenput stripInfo(theInfo) into line 20 of configData-- add here --else if theInfo contains "%HOMEURL" thenput stripInfo(theInfo) into line 31 of configDataelse if theInfo contains "%HOME" thenput stripInfo(theInfo) into line 32 of configDataelse if theInfo contains "%PARENTURL" thenput stripInfo(theInfo) into line 33 of configDataelse if theInfo contains "%PARENT" thenput stripInfo(theInfo) into line 34 of configDataelse if theInfo contains "%PREVURL" thenput stripInfo(theInfo) into line 35 of configDataelse if theInfo contains "%PREV" thenput stripInfo(theInfo) into line 36 of configDataelse if theInfo contains "%NEXTURL" thenput stripInfo(theInfo) into line 37 of configDataelse if theInfo contains "%NEXT" thenput stripInfo(theInfo) into line 38 of configDataelse if theInfo contains "%INDEXURL" thenput stripInfo(theInfo) into line 39 of configDataelse if theInfo contains "%INDEX" thenput stripInfo(theInfo) into line 40 of configDataend ifelse if line x of mainText is empty thendelete line x of mainTextelse if char 1 of line x of mainText is not in stopChars thenif line x-1 of mainText is empty then-- do nothingelse if char 1 of line x-1 of mainText is in specialChars then-- do nothingelseget line x of mainTextdelete line x of mainTextput space & it after line x-1 of mainTextend ifend ifend repeatif line 1 of configData is empty thenset itemDelimiter to ":"get last item of inputFileset itemDelimiter to "."put item 1 of it into line 1 of configDataend ifif line 2 of configData is empty thenput line 1 of configData into line 2 of configDataend ifif line 3 of configData is empty thenput line 2 of configData into line 3 of configDataend ifif char 1 of line 2 of configData is "$" thendelete char 1 of line 2 of configDataend ifif line 4 of configData is empty and ┬¼line 5 of configData is not empty thenput line 5 of configData into line 4 of configDataend ifif line 5 of configData contains "@" and ┬¼"mailto:" is not in line 5 of configData thenput "mailto:" before line 5 of configDataend ifif line 7 of configData is empty and ┬¼line 8 of configData is not empty thenput line 8 of configData into line 7 of configDataend ifif line 8 of configData contains "@" and ┬¼"mailto:" is not in line 8 of configData thenput "mailto:" before line 8 of configDataend ifif line 10 of configData is "slide" thenput "slide" into line 9 of configDataput word 1 of line 17 of configData into line 17 of configDataelse if line 10 of configData is "print" thenput "none" into line 9 of configDataput empty into line 18 of configDataend ifif line 11 of configData is not empty thenif char 1 of line 11 of configData is "$" thendelete char 1 of line 11 of configDataput "<CENTER><IMG SRC=" & quote & line 13 of configData & ┬¼line 11 of configData & ".gif" & quote & "></CENTER>" ┬¼into line 11 of configDataelseput "<IMG SRC=" & quote & line 13 of configData & ┬¼line 11 of configData & ".gif" & quote & ">" ┬¼into line 11 of configDataend ifend ifif line 12 of configData is not empty thenput "<IMG SRC=" & quote & line 13 of configData & ┬¼line 12 of configData & ".gif" & quote & "ALIGN=left>" ┬¼into line 11 of configDataend ifif line 15 of configData is not empty thenput line 15 of configData & line 1 of configData & ┬¼".html" into line 15 of configDataend ifif line 16 of configData is not empty thenput line 16 of configData & line 1 of configData & ┬¼".html" into line 15 of configDataput line 15 of configData into line 16 of configDataend ifif line 17 of configData is not empty thenif number of words of line 17 of configData > 1 thenput word 1 of line 17 of configData into theSecondsdelete word 1 of line 17 of configDataput line 17 of configData into theURLput theSeconds & "; URL=" & theURL into line 17 of configDataend ifend ifput "<BODY" into theBodyif line 19 of configData is not empty then ┬¼put " " & line 19 of configData after theBodyif line 20 of configData is not empty then ┬¼put " BACKGROUND=" & quote & line 13 of configData & ┬¼line 20 of configData & ".gif" & quote after theBodyput theBody & ">" into line 19 of configDataif line 31 of configData is not empty thenif line 31 of configData is "none" thenif line 32 of configData is empty thenput "Home Page" into line 32 of configDataend ifelse if line 32 of configData is empty thenput "<A HREF=" & quote & line 31 of configData & quote & ┬¼">Home Page</A>" into line 32 of configDataelseput "<A HREF=" & quote & line 31 of configData & quote & ┬¼">" & line 32 of configData & "</A>" into line 32 of configDataend ifend ifif line 33 of configData is not empty thenif line 33 of configData is "none" thenif line 34 of configData is empty thenput "Parent Page" into line 34 of configDataend ifelse if line 34 of configData is empty thenput "<A HREF=" & quote & line 33 of configData & quote & ┬¼">Parent Page</A>" into line 34 of configDataelseput "<A HREF=" & quote & line 33 of configData & quote & ┬¼">" & line 34 of configData & "</A>" into line 34 of configDataend ifend ifif line 35 of configData is not empty thenif line 35 of configData is "none" thenif line 36 of configData is empty thenput "Previous Page" into line 36 of configDataend ifelse if line 36 of configData is empty thenput "<A HREF=" & quote & line 35 of configData & quote & ┬¼">Previous Page</A>" into line 36 of configDataelseput "<A HREF=" & quote & line 35 of configData & quote & ┬¼">" & line 36 of configData & "</A>" into line 36 of configDataend ifend ifif line 37 of configData is not empty thenif line 37 of configData is "none" thenif line 38 of configData is empty thenput "Next Page" into line 38 of configDataend ifelse if line 38 of configData is empty thenput "<A HREF=" & quote & line 37 of configData & quote & ┬¼">Next Page</A>" into line 38 of configDataelseput "<A HREF=" & quote & line 37 of configData & quote & ┬¼">" & line 38 of configData & "</A>" into line 38 of configDataend ifend ifif line 39 of configData is not empty thenif line 39 of configData is "none" thenif line 40 of configData is empty thenput "Index Page" into line 40 of configDataend ifelse if line 40 of configData is empty thenput "<A HREF=" & quote & line 39 of configData & quote & ┬¼">Index Page</A>" into line 40 of configDataelseput "<A HREF=" & quote & line 39 of configData & quote & ┬¼">" & line 40 of configData & "</A>" into line 40 of configDataend ifend ifput number of lines of mainText && "Lines /" && number of chars ┬¼of mainText && "Characters" & return before fld "infoText"return mainTextend scanFilefunction checkMTX inputFile, versNumglobal configDataput word 2 of line 6 of configData into mtxNumif "html" is in line 6 of configData thenbeepbeepanswer "WARNING: This file is already in HTML format!" with "Cancel"put empty into fld "info"put return & "Canceling:" && inputFile & return before fld "infoText"return "cancel"else if "mtx" is not in line 6 of configData thenbeepbeepanswer "WARNING: This may not be an MTX file!" ┬¼with "Cancel" or "Continue"if it is "Cancel" thenput empty into fld "info"put return & "Canceling:" && inputFile & return before fld "infoText"return "cancel"end ifelse if mtxNum is not empty and mtxNum is not in versNum thenbeepbeepanswer "WARNING: This file uses an another version (" & mtxNum & ┬¼") of MTX! Certain constructs may fail." with "Cancel" or "Continue"if it is "Cancel" thenput empty into fld "info"put return & "Canceling:" && inputFile & return before fld "infoText"return "cancel"end ifend ifreturn emptyend checkMTXfunction makeKeywords theText, inputFolder, theTypeif theType is not "keyword" then return theTextput FolderContents(inputFolder, "Files") into theFilesrepeat with x=1 to number of lines of theFilesset cursor to busyset itemDelimiter to "."put line x of theFiles into inputFileput first item of inputFile & ".html" into linkFileif last item of inputFile is not "mtx" then next repeatput "Indexing" && inputFile & "..." into line 2 of fld "info"put empty into scanTextput inputFolder before inputFileopen file inputFileread from file inputFile for 16000repeat while it is not emptyput it after scanTextread from file inputFile for 16000end repeatclose file inputFileget number of lines in char 1 to ┬¼(offset("%LAYOUT",scanText)) of scanTextif it is not 0 thenget line it of scanTextif it contains "keyword" then next repeatif it contains "noindex" then next repeatif it contains "cover" then next repeatend ifget number of lines in char 1 to ┬¼(offset("%FILE",scanText)) of scanTextif it is not 0 thenput line it of scanText into linkFiledelete word 1 of linkFileput ".html" after linkFileend ifget number of lines in char 1 to ┬¼(offset("%TITLE",scanText)) of scanTextif it is 0 thenput linkFile into linkTitleelseput line it of scanText into linkTitledelete word 1 of linkTitleend ifget number of lines in char 1 to ┬¼(offset("%HEADING",scanText)) of scanTextif it is 0 then-- do nothingelseput line it of scanText into linkTitledelete word 1 of linkTitleend ifrepeat with y=1 to number of lines of theTextput empty into theLinksset itemDelimiter to "|"put item 1 of line y of theText into theLineif char 1 of theLine is "\" thenset itemDelimiter to "\"repeat with z=2 to number of items of theLineif offset(item z of theLine,scanText) is not 0 thenset cursor to busyput "|" & linkTitle & "^" & linkFile after theLinksexit repeatend ifend repeatput theLinks after line y of theTextend ifend repeatend repeatput "Formatting index..." into line 2 of fld "info"repeat with y=number of lines of theText down to 1set cursor to busyput empty into kwListset itemDelimiter to "|"put line y of theText into theLinksput item 1 of theLinks into theLinedelete item 1 of theLinksif char 1 of theLine is not "\" then next repeatset itemDelimiter to "\"put tab into char 1 of theLineput item 1 of theLine into theLinerepeat until "|" is not in theLinksput return into char offset("|", theLinks) of theLinksend repeatsort theLinksset itemDelimiter to "^"repeat with z=1 to number of lines of theLinksput item 1 of line z of theLinks into kwTextput item 2 of line z of theLinks into kwLinkput tab & tab & "<A HREF=" & quote & kwLink & quote & ">" & ┬¼kwText & "</A>" & return after kwListend repeatput theLine & return & kwList into line y of theTextend repeatreturn theTextend makeKeywordsfunction makeTitleglobal configDataset cursor to busyput return & linefeed into EOLif char 1 of line 3 of configData is "$" thendelete char 1 of line 3 of configDataput "<CENTER>" into preTput "</CENTER>" into postTelseput empty into preTput empty into postTend ifif line 3 of configData is empty thenput preT & line 11 of configData & EOL & ┬¼"<H1>" & line 2 of configData & "</H1>" & ┬¼postT & EOL after titleTextelse if line 3 of configData is "none" thenput preT & line 11 of configData & EOL & postT & EOL ┬¼after titleTextelseput preT & line 11 of configData & EOL & ┬¼"<H1>" & line 3 of configData & "</H1>" & ┬¼postT & EOL after titleTextend ifreturn titleTextend makeTitlefunction makeSlideTitle theTitle, indexPage, prevPage, nextPageglobal configDataset cursor to busyput return & linefeed into EOLput "<B><A HREF=" & quote & prevPage & quote & ">= </A><A HREF=" & ┬¼quote & nextPage & quote & ">" & theTitle & "</A><A HREF=" & quote & ┬¼indexPage & quote & "> =</A></B><P>" into titleTextreturn titleTextend makeSlideTitlefunction makeAnswerTitleglobal configDataset cursor to busyput return & linefeed into EOLif char 1 of line 3 of configData is "$" thendelete char 1 of line 3 of configDataput "<CENTER>" into preTput "</CENTER>" into postTelseput empty into preTput empty into postTend ifif line 3 of configData is empty thenput preT & "<H1>" & line 2 of configData & ┬¼"</H1>" & postT & EOL after titleTextelse if line 3 of configData is "none" thenput preT & "<H1>Answers to Questions</H1>" & ┬¼postT & EOL after titleTextelseput preT & "<H1>" & line 3 of configData & ┬¼"</H1>" & postT & EOL after titleTextend ifreturn titleTextend makeAnswerTitlefunction makeHead theTitle, nextPageglobal configDataset cursor to busyput return & linefeed into EOLif line 10 of configData is "slide" and nextPage is empty then ┬¼put line 1 of configData & "1" & ".html" into nextPageput line 14 of configData & EOL into headTextput "<HEAD>" & EOL after headTextput "<TITLE>" & theTitle & "</TITLE>" & EOL after headTextif line 16 of configData is not empty then ┬¼put "<BASE HREF=" & quote & line 16 of configData & quote & ">" & EOL after headTextif line 17 of configData is not empty thenif nextPage is empty thenput "<META HTTP-EQUIV=" & quote & "refresh" & quote && ┬¼"CONTENT=" & quote & line 17 of configData & quote & ">" & EOL after headTextelseput "<META HTTP-EQUIV=" & quote & "refresh" & quote && ┬¼"CONTENT=" & quote & line 17 of configData & "; URL=" & ┬¼nextPage & quote & ">" & EOL after headTextend ifend ifput "</HEAD>" & EOL after headTextreturn headTextend makeHeadfunction makeTail modDate, upDateglobal configDataset cursor to busyput empty into tailTextput return & linefeed into EOLif line 18 of configData is not empty thenput last word of line 18 of configData into countURLput line 18 of configData into countDatedelete last word of countDateput "<I>You are visitor &nbsp;<IMG SRC=" & quote & ┬¼countURL & quote & " ALIGN=ABSMIDDLE> since" && ┬¼countDate & ".</I><HR>" & EOL after tailTextend ifif line 10 of configData is not "cover" thenput "<I>Edited on" && modDate & " / Updated on" && ┬¼upDate & "</I><BR>" & EOL after tailTextend ifif line 7 of configData is not empty thenif line 8 of configData is not empty thenput "<I><A HREF=" & quote & line 8 of configData & quote & ┬¼">" & line 7 of configData & "</A></I><BR>" & EOL after tailTextelseput "<I>" & line 7 of configData && "</I><BR>" & EOL after tailTextend ifend ifif line 15 of configData is not empty thenput "<I>Location:" && line 15 of configData & "</I><BR>" & EOL after tailTextend ifif line 4 of configData is not empty thenif line 5 of configData is not empty thenput "<ADDRESS>Contact: <A HREF=" & quote & line 5 of configData & quote & ┬¼">" & line 4 of configData & "</A></ADDRESS>" & EOL after tailTextelseput "<ADDRESS>Contact:" && line 4 of configData & "</ADDRESS>" & EOL after tailTextend ifend ifreturn tailTextend makeTailfunction makeNaviglobal configDataset cursor to busyput empty into naviTextput return & linefeed into EOLif line 10 of configData is "print" then return emptyif line 38 of configData is not empty thenput line 38 of configData after naviTextend ifif line 36 of configData is not empty thenif naviText is empty thenput line 36 of configData after naviTextelseput line 36 of configData & " | " before naviTextend ifend ifif line 40 of configData is not empty thenif naviText is empty thenput line 40 of configData after naviTextelseput line 40 of configData & " | " before naviTextend ifend ifif line 34 of configData is not empty thenif naviText is empty thenput line 34 of configData after naviTextelseput line 34 of configData & " | " before naviTextend ifend ifif line 32 of configData is not empty thenif naviText is empty thenput line 32 of configData after naviTextelseput line 32 of configData & " | " before naviTextend ifend ifreturn naviTextend makeNavifunction makeLeader mainTextset cursor to busyput return & linefeed into EOLif offset("<A NAME=" & quote & "AA",mainText) is 0 then return mainTextrepeat with x=1 to number of lines of mainTextif "<A NAME=" & quote & "AA" is in line x of mainText thenexit repeatelseput line x of mainText & return after leaderTextend ifend repeatif x > 1 then return leaderTextreturn emptyend makeLeaderfunction stripLeader mainTextset cursor to busyrepeat with x=1 to number of lines of mainTextif "<A NAME=" & quote & "AA" is in line 1 of mainText thenexit repeatelsedelete line 1 of mainTextdelete char 1 of mainTextend ifend repeatreturn mainTextend stripLeaderfunction stripInfo theTextrepeat while char 1 of theText is not space and char 1 of theText is not tabdelete char 1 of theTextend repeatrepeat while char 1 of theText is space or char 1 of theText is tabdelete char 1 of theTextend repeatreturn theTextend stripInfofunction slideInforeturn "<I><B>Notes on the use of these slides:</B>" && ┬¼"To start, click on any slide in the list above." && ┬¼"To go to the next slide, click on the slide's title." && ┬¼"To go to the previous slide, click on the left end of the slide's title." && ┬¼"To return to this index page, click on the right end of the slide's title." && ┬¼"Adjust the font size of your browser as needed.</I>" & ┬¼return & linefeedend slideInfofunction fixChars theTextrepeat until "&" is not in theTextput "ΓÇó" into char offset("&", theText) of theTextend repeatrepeat until "ΓÇó" is not in theTextput "&amp;" into char offset("ΓÇó", theText) of theTextend repeatrepeat until "<" is not in theTextput "&lt;" into char offset("<", theText) of theTextend repeatrepeat until ">" is not in theTextput "&gt;" into char offset(">", theText) of theTextend repeatrepeat until quote is not in theTextput "&quot;" into char offset(quote, theText) of theTextend repeatreturn theTextend fixCharsfunction fixMain theTextrepeat until "Γëñ" is not in theTextput "{" into char offset("Γëñ", theText) of theTextend repeatrepeat until "ΓëÑ" is not in theTextput "}" into char offset("ΓëÑ", theText) of theTextend repeatreturn theTextend fixMainfunction stripLineFeeds theTextrepeat until linefeed is not in theTextset cursor to busydelete char offset(linefeed, theText) of theTextend repeatreturn theTextend stripLineFeeds-- function addLinefeeds theText-- if theText is empty then return empty-- repeat with x=2 to number of lines of theText-- put linefeed before line x of theText-- end repeat-- return theText & linefeed-- end addLinefeeds-- function addLineBreaks theText-- if theText is empty then return empty-- put "<BR>" after line 1 of theText-- repeat with x=2 to number of lines of theText-- put "<BR>" after line x of theText-- put linefeed before line x of theText-- end repeat-- return theText & linefeed-- end addLineBreaksfunction stripPath theTextset itemDelimiter to ":"return last item of theTextend stripPathfunction stripFile theTextset itemDelimiter to ":"delete last item of theTextreturn theTextend stripFileon reorgsort by fld "name"repeat with x=2 to number of cdsput (fld "name" of cd x) & return after theListend repeatgo firstput theList into cd fld "list"end reorg</script>
  17.     <background id="2687" file="background_2687.xml" name="mtx" />
  18.     <card id="3992" file="card_3992.xml" marked="false" name="" owner="2687" />
  19.     <card id="5645" file="card_5645.xml" marked="false" name="one at a time" owner="2687" />
  20.     <card id="2442" file="card_2442.xml" marked="false" name="" owner="2687" />
  21. </stack>
  22.